#!/usr/bin/python
# -*- coding: UTF-8 -*-
from stock.iwen_anlayse import *
from stock.indus import IndusBean
import json


def main():
    stock = StockAlayse()
    add_stock_exchange(stock)
    # stock.get_stock_mongodb()
    # result=stock.query_indus_stock("特高压")
    # print(list(result))
    # stock.delete_stock_byTag("特高压")

    # result=stock.query_all_indus()
    # aa=list(result)
    # for i in aa:
    #     print(i["name"])
    # add_indus(stock)


def add_stock_exchange(stock):
    exchange={
        "股票名称":"北陆药业",
        "股票代码":"300016",
        "行业":"医药",
        "买入逻辑":"市场投机",
        "卖出逻辑":"止盈",
        "盈亏额":6251,
        "持有时间":8
    }
    stock.save_exchange_record(exchange)

def add_indus(stock):
    indus = {
        "name": "公用事业",
        "des": "负债率高,低利率受益,业绩增长分化",
        "sample": [
            "长青集团",
            "伟明环保",
            "瀚蓝环境",

        ],
        "g": 2
    }
    bean = IndusBean(indus)
    stock.add_indus(bean.to_json())


def addIndus():
    pass


if __name__ == '__main__':
    main()
